package com.jqq.collection_;

import java.util.ArrayList;
import java.util.Collection;

/**
 * @author 姬倩倩
 * @version 1.0
 */
public class CollectionFor {
    @SuppressWarnings({"all"})
    public static void main(String[] args) {
        Collection col = new ArrayList();
        col.add(new Book("三国演义","罗贯中",10.1));
        col.add(new Book("小李飞刀","古龙",5.1));
        col.add(new Book("红楼梦","曹雪芹",34.6));

        //可以理解成简化版本的迭代器遍历
        //快捷方式I
        for(Object book : col){
            System.out.println(book);
        }


    }
}
